package com.shenmazong.lambda;

/**
 * @program: server-java-demo
 * @description: LambdaTest1
 * @author: 亮子说编程
 * @create: 2020-10-19 14:17
 **/
public class LambdaTest1 {

    final static String salutation = "Hello! ";

    public static void main(String[] args) {
        MessageService service = message ->
                System.out.println(salutation + message);
        service.sayMessage("Runoob");
    }

    interface MessageService {
        void sayMessage(String message);
    }
}
